﻿@model IEnumerable<Weapsy.Reporting.Menus.MenuViewModel.MenuItem>

@if (Model.Count() > 0)
{
    <ul class="dropdown-menu">
        @foreach (var menuItem in Model)
        {
            <li class="@(menuItem.Children.Count() > 0 ? "dropdown-submenu" : "")">
                <a href="@menuItem.Url" title="@menuItem.Title">@menuItem.Text</a>
                @await Html.PartialAsync("~/Views/Shared/Components/Navigation/_ChildrenPartial.cshtml", menuItem.Children)
            </li>            
        }
    </ul>
}